<?php 

namespace app\common\validate\dormitory;

use think\Validate;

class DormitoryFloorRoom extends Validate 
{ 
    protected $rule = [
        'room_name' => 'require',
        'floor_id' => 'require',
        'number' => 'require',
    ];

    protected $message = [
        'room_name.require' => '请输入名称',
        'floor_id.require' => '请输入所属楼层',
        'number.require' => '请输入可入住人数',
    ];

    protected $scene = [
        'edit' => ['room_name','admin_name','floor_id','room_type','number','already_number','already_person_str','id'],
        'add' => ['room_name','admin_name','floor_id','room_type','number','already_number','already_person_str'],
    ];

} 
